/* 
无参构造
捕获
析构函数
 */
#include <iostream>

using namespace std;

class MyException
{
public:
    MyException()
    {
        cout << "无参构造" << endl;
    }
    MyException(const MyException &ob)
    {
        cout << "拷贝构造" << endl;
    }
    ~MyException()
    {
        cout << "析构函数" << endl;
    }
};

int main(int argc, char **argv)
{

    try 
    {
        /* 调用无参构造函数 */
        throw MyException();
    }
    catch (MyException &) /* 不执行拷贝构造 */
    {
        cout << "捕获" << endl;
    }


    return 0;
}